import dayjs from "dayjs";

export function getToday(str="MM月DD日"){
    return new Date()
}

export function getTomorrow(str="MM月DD日"){
    const nowDay = new Date()
    return new Date(nowDay.setDate(nowDay.getDate()+1))
}

export function diffDay(nowDay,nextDay){
    nowDay = dayjs(nowDay).format('YYYY-MM-DD')
    nextDay = dayjs(nextDay).format('YYYY-MM-DD')
    return dayjs(nextDay).diff(nowDay, 'day')
}

export function formatDay(data,str="MM月DD日"){
    return dayjs(data).format(str)
}